# -*- coding: utf-8 -*-

def clearBlankLine():
    file1 = open('/Users/lch/data/test.txt', 'r')  # 要去掉空行的文件
    file2 = open('/Users/lch/data/test1.txt', 'w')  # 生成没有空行的文件
    try:
        for line in file1.readlines():
            line1 = "A" + line + "A,"
            file2.write(line1)
    finally:
        file1.close()
        file2.close()


if __name__ == '__main__':
    clearBlankLine()
